package com.mworld.galaxy.bull.repository.product;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.mworld.galaxy.bull.entity.product.Product;

public interface ProductDao extends PagingAndSortingRepository<Product, Long>, JpaSpecificationExecutor<Product> {
    @Modifying
    @Query("update Product product set product.status = ?2 where product.id = ?1")
    void changeStatus(Long id, int status);
}
